/*Reset*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/*Actual CSS*/
:root {
  --text: #000;
  --inverted-text: #FFF;
  --secondary-text: #5c3f08;
  --highlight: #E75296;
  --progress: repeating-linear-gradient(45deg,#009e13,#009e13 10px,#0D7319 10px,#0D7319 20px);#;
  --error: #dc0039;
  --bg-color: #D5E8DD;
  --box-shadow: 0 0 5pt 2pt rgba(0,0,0,0.1);
}
::-webkit-scrollbar {
  width: 5pt;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-text);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--highlight);
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16pt;
  background-color: var(--bg-color);
  background-image: url("../assets/bg.png");
}

.container {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 10pt;
  margin-top: 0.5em;
}

kbd {
  padding: 3pt;
  border: 2px solid var(--secondary-text);
  margin: 0 auto;
  background: white;
  border-radius: 2pt;
}


/* Progress Display */
.progress {
  margin: 0.5em auto;
  width: 50vw;
  display: none;
}

.progressbar,
.progresstext {
  width: 50vw;
}

.progressbar {
  position: relative;
  border: 4pt solid var(--highlight);
  background: white;
  padding: 5px;
  margin: 5pt auto;
  border-radius: 20pt;
  box-shadow: var(--box-shadow);
}

.progresstext {
  display: none;
}

.battleWrapper {
  text-align: left;
  font-weight: bold;
  color: white;
  text-shadow: -1px -1px 0 var(--highlight), 0 -1px 0 var(--highlight), 1px -1px 0 var(--highlight), 1px 0 0 var(--highlight), 1px 1px 0 var(--highlight), 0 1px 0 var(--highlight), -1px 1px 0 var(--highlight), -1px  0   0 var(--highlight);
}

.progressfill {
  height: 20px;
  background: var(--progress);
  width: 0%;
  border-radius: 20pt;
}

.sorter {
  margin: 0 auto;
  display: grid;
  gap: 10pt;
}

input[type=checkbox] {
    transform: scale(1.5);
}

@media all and (min-width: 300px) {
  .sorter,
  .progress {
    transform: scale(1.0);
  }

}

@media all and (min-width: 1024px) {
   body {overflow-x: hidden;}
  .sorter,
  .progress {
    transform: scale(1.0);
  }
}

/* Button Handling */

.button {
  border: 1px solid var(--highlight);
  text-align: center;
  padding: 10px;
  grid-column: 3 / 6;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: white;
}

.starting.start.button {
  grid-row: span 6;
  display: flex;
  align-items: center;
}

.starting.load.button {
  grid-row: span 3;
  display: none;
}

.sorting.button, .finished.button {
  grid-row: span 2;
  display: none;
}

.finished.getimg.button a{
    color: black;
    font-weight: normal;
}
.finished.getimg.button a:hover{
    color: white;
}

.loading.button {
  grid-row: span 6;
  display: none;
}

.loading:hover {
  background: none;
  color: var(--text);
}

.loading.button > div {
  width: 25px;
  height: 25px;
  margin: 50px auto;
  background-color: var(--highlight);
  border-radius: 100%;
  -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

/* Animation taken from: http://tobiasahlin.com/spinkit/ */

.loading.button > span {
  margin: auto auto 20%;
  font-size: 0.7em;
}

@-webkit-keyframes sk-scaleout {
  0% { -webkit-transform: scale(0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes sk-scaleout {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  } 100% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
    opacity: 0;
  }
}

/* Actual Sorter Widget Styling */

.sorter > .image {
  height: 50vh;
  grid-row: 1 / 7;
  cursor: pointer;
  object-fit: contain;
  object-position: top;
  background-color: white;
}
.sorter > .image,
.sorter > .text {
  width: 25vw;
}
.sorter > .image,
.sorter > .text,
.button {
  border-radius: 10pt;
  border: 4pt solid var(--highlight);
  box-shadow: var(--box-shadow);
}

@media (hover: hover) and (pointer: fine) {
  .sorter > .image:hover {
    background: var(--highlight);
  }

  .button:hover {
    background-color: var(--highlight);
    color: var(--inverted-text);
  }
}

.sorter > .text {
  height: 40px;
  display: none;
  border: unset;
  box-shadow: unset;
  color: white;
  text-shadow: -1px -1px 0 var(--highlight), 0 -1px 0 var(--highlight), 1px -1px 0 var(--highlight), 1px 0 0 var(--highlight), 1px 1px 0 var(--highlight), 0 1px 0 var(--highlight), -1px 1px 0 var(--highlight), -1px  0   0 var(--highlight);
  font-weight: bold;
  font-size: 20pt;
}

.sorter > .text > p {
  margin: 0.5em 5px 0px;
  width: calc(100%-10px);
  text-align: center;
  font-size: 0.8em;
  line-height: 1.5em;
}

.sorter > .left {
  grid-column: 2 / 2;

  
}

.sorter > .right {
  grid-column: 6 / 7;
}

/* Options */

.options {
  margin: 1em auto;
  display: grid;
  text-align: left;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  width: 60vw;
}

.options > div {
  display: flex;
  align-items: center;
  font-size: 0.8em;
}

label {
  cursor: pointer;
}

.options > .large.option {
  font-size: 1em;
}

.options > .large.option, .options > hr {
  grid-column: span 3;
  text-align: center;
  justify-content: center;
  width: 100%;
}

.options > hr {
  background: transparent;
  height: 2px;
  border-top: 2px dashed #8c8b8b;
  border-bottom: none;
}

.image.selector {
  margin-top: 0.5em;
  width: 500px;
  display: none;
  text-align: center;
  font-size: 0.75em;
}

/* Results */

.time.taken {
  margin-top: 0.5em;
  width: 500px;
  display: none;
  text-align: center;
  font-size: 0.75em;
  font-style: italic;
}

.results {
  font-size: 0.75em;
  display: flex;
  align-content: center;
  width: 80%;
  margin: 0.5em auto;
}

@media all and (min-width: 600px) {
  .results {
    flex-flow: column wrap;
    max-height: calc(5 * (175px + 2px) + 1 * (15px + 2px));
  }
}
@media all and (max-width: 600px) {
  .results {
    flex-flow: column nowrap;
  }
}

.result {
  height: 15px;
  margin-bottom: -1px;
  display: grid;
  width: 211px;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--highlight);
  margin-right: 5px;
  flex-basis: fit-content;
  background: white;
}

.result.image {
  height: 175px;
}

.result.image img {
  height: 160px;
  width: 160px;
  object-fit: contain;
  object-position: top;
}

.result.spacer {
  height: 1px;
  background-color: var(--highlight);
}

.result.head {
  background-color: var(--highlight);
  color: #FFF;
}

.result > .left {
  width: 35px;
  padding: 1px 3px 1px 0.5em;
  grid-column: 1 / 2;
  text-align: center;
}

.result.image .left {
  position: relative;
}

.result.image > .left span {
  position: relative;
  font-size: 25pt;
  top: 45%;
  left: 5pt;
  margin-top: -0.375em;
}

.result > .right {
  width: 150px;
  padding: 1px 0em 1px 0em;
  grid-column: 2 / 3;
  border-left: 1px solid var(--highlight);
}

.resultCharacterName {
  background: linear-gradient(90deg, var(--highlight) 0%, rgba(48,49,57,0) 100%);
  margin-bottom: -1pt;
  padding: 1pt 0;
  color: var(--inverted-text);
}

.resultCharacterName span,
.right span {
  padding-left: 5px;
}

/* General Text */

.info {
  margin: 2em auto 3em;
  display: block;
  text-align: center;
  font-size: 0.6875em;
  width: 80%;
  line-height: 1.2em;
}

a {
  color: var(--secondary-text);
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

label:hover, a:hover {
  color: var(--highlight);
}

#Twitter {
  height: 0px;
  overflow: hidden;
}
